package com.szpx.entity;

import lombok.Data;

import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data

@Table(name = "ddwUser")

public class DdwUser implements Serializable {
    private  Integer id;  //主键ID
    private  String email; // 邮箱
    private  String password; //密码
    private  String salt;  //盐
    private  String confirmCode;  //确认码
    private LocalDateTime activationTime;  //激活失效时间
    private  Byte isValid;   //是否可用

    public DdwUser() {
    }

    public DdwUser(Integer id, String email, String password, String salt, String confirmCode, LocalDateTime activationTime, Byte isValid) {
        this.id = id;
        this.email = email;
        this.password = password;
        this.salt = salt;
        this.confirmCode = confirmCode;
        this.activationTime = activationTime;
        this.isValid = isValid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getConfirmCode() {
        return confirmCode;
    }

    public void setConfirmCode(String confirmCode) {
        this.confirmCode = confirmCode;
    }

    public LocalDateTime getActivationTime() {
        return activationTime;
    }

    public void setActivationTime(LocalDateTime activationTime) {
        this.activationTime = activationTime;
    }

    public Byte getIsValid() {
        return isValid;
    }

    public void setIsValid(Byte isValid) {
        this.isValid = isValid;
    }

    @Override
    public String toString() {
        return "DdwUser{" +
                "id=" + id +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", confirmCode='" + confirmCode + '\'' +
                ", activationTime=" + activationTime +
                ", isValid=" + isValid +
                '}';
    }
}
